Skip to content

feat(@angular/cli): add initial set of signal form examples#31134

Closed
clydin wants to merge 5 commits intoangular:mainfrom
clydin:mcp/signal-form-examples
Closed

feat(@angular/cli): add initial set of signal form examples#31134
clydin wants to merge 5 commits intoangular:mainfrom
clydin:mcp/signal-form-examples

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented Sep 8, 2025

This commit introduces a comprehensive set of 18 examples for the new signal-based forms functionality in Angular. These examples are designed to be used with the find_examples tool (MCP) to provide developers with actionable, real-world code snippets covering a wide range of use cases.

The find_examples tool is currently experimental and must be enabled using the -E find_examples option when running the ng mcp command.

The examples cover the following key concepts:

  • Core concepts and basic setup
  • Built-in and cross-field validation
  • Dynamic and conditional form structures
  • Custom form controls and reusable validators
  • Asynchronous operations and third-party integrations (Zod)
  • Best practices for testing, accessibility, and styling

@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: @angular/cli labels Sep 8, 2025
@clydin clydin force-pushed the mcp/signal-form-examples branch 2 times, most recently from 93f4632 to 0c84e42 Compare September 8, 2025 13:55
@clydin clydin added the target: major This PR is targeted for the next major release label Sep 8, 2025
@clydin clydin force-pushed the mcp/signal-form-examples branch 3 times, most recently from dd1d83d to 3653ee5 Compare September 8, 2025 23:10
@clydin clydin requested a review from mmalerba September 9, 2025 12:10
@clydin clydin force-pushed the mcp/signal-form-examples branch from 3653ee5 to 190a3a0 Compare September 11, 2025 14:18
Comment thread packages/angular/cli/lib/examples/signal-forms/15-accessible-styled-forms.md Outdated
Comment thread packages/angular/cli/lib/examples/signal-forms/15-accessible-styled-forms.md Outdated
Comment thread packages/angular/cli/lib/examples/signal-forms/15-accessible-styled-forms.md Outdated
Comment thread packages/angular/cli/lib/examples/signal-forms/15-accessible-styled-forms.md Outdated
type="text"
[control]="registrationForm.name"
[class.invalid]="registrationForm.name().invalid() && registrationForm.name().touched()"
[attr.aria-invalid]="registrationForm.name().invalid()"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one will be supported once angular/angular#63748 gets in and is released

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[attr.aria-invalid] is working right?
[aria-invalid] was not.

Comment thread packages/angular/cli/lib/examples/signal-forms/03-cross-field-validation.md Outdated
Comment thread packages/angular/cli/lib/examples/signal-forms/03-cross-field-validation.md Outdated
Comment thread packages/angular/cli/lib/examples/signal-forms/02-built-in-validators.md Outdated
@clydin clydin force-pushed the mcp/signal-form-examples branch from 190a3a0 to e38896f Compare October 18, 2025 00:18
Comment thread packages/angular/cli/lib/examples/signal-forms/03-cross-field-validation.md Outdated
This commit introduces a comprehensive set of 18 examples for the new signal-based forms functionality in Angular. These examples are designed to be used with the `find_examples` tool (MCP) to provide developers with actionable, real-world code snippets covering a wide range of use cases.

The `find_examples` tool is currently experimental and must be enabled using the `-E find_examples` option when running the `ng mcp` command.

The examples cover the following key concepts:
- Core concepts and basic setup
- Built-in and cross-field validation
- Dynamic and conditional form structures
- Custom form controls and reusable validators
- Asynchronous operations and third-party integrations (Zod)
- Best practices for testing, accessibility, and styling
@clydin clydin force-pushed the mcp/signal-form-examples branch from e38896f to 40f080a Compare November 12, 2025 15:30
@clydin clydin closed this Feb 4, 2026
@attilacsanyi
Copy link
Copy Markdown

I spotted it was not merged, is there a better version or alternative signal forms examples in angular repo somewhere? Thank you for any references here. 🙏

@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Mar 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: @angular/cli detected: feature PR contains a feature commit target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants